<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->resource('auth/users', 'UserController');

    $router->get('/', 'HomeController@index');

    //城市列表
    $router->resource('city', CityListController::class);
    //更新城市列表
    $router->post('updatecitylist', 'CityListController@updateCityList')->name('updateCityList');
    //开拓城市
    $router->resource('opencity', OpenCityController::class);

    //广告列表
    $router->resource('ad', AdController::class);
    //随机广告
    $router->resource('randad', RandAdController::class);
    //挑战赛
    $router->resource('challenge', ChallengeGameController::class);
    //锦标赛
    $router->resource('champion', ChampionshipController::class);
    $router->any('/champion/confirm/{id}', 'ChampionshipController@confirm')->name('champion.confirm');
    $router->any('/champion/close/{id}', 'ChampionshipController@close')->name('champion.close');
    //擂台赛
    $router->resource('arenacontest', ArenacontestController::class);
    $router->any('/arenacontest/confirm/{id}', 'ArenacontestController@confirm')->name('arenacontest.confirm');
    $router->any('/arenacontest/close/{id}', 'ArenacontestController@close')->name('arenacontest.close');

    //擂台赛报名者
    $router->resource('ArenacontestUser', ArenacontestUserController::class);
    $router->any('/arenacontestuser/close/{id}', 'ArenacontestUserController@close')->name('arenacontestuser.close');
    $router->any('/arenacontestuser/confirm/{id}', 'ArenacontestUserController@confirm')->name('arenacontestuser.confirm');
    //交易
    $router->resource('arenacontesttransaction', ArenacontestTransactionController::class);
    $router->resource('arenacontestrefund', ArenacontestRefundController::class);
    $router->post('/arenacontestuser/{id}/refundorder', 'ArenacontestUserController@refundOrder')->name('arenacontestuser.refundorder');
    //活跃度规则提示
    $router->resource('rankingtips', RankingTipsController::class);
    //球馆管理
    $router->resource('sects', SectsController::class);
    //广告内容页
    $router->resource('advertisementdetail', advertisementDetailController::class);
    //微信小程序设置
    $router->resource('wechatuserprivacy', WechatUserPrivacyController::class);



    //传奇榜
    $router->resource('legend', LegendController::class);
    //意见反馈
    $router->resource('feedback', FeedbackController::class);
    //攻略
    $router->resource('raider', RaiderController::class);

    //分享标语
    $router->resource('sharetitle', ShareTitleController::class);

    //红包
    $router->resource('luckmoneyrule', LuckMoneyRuleController::class);
    $router->resource('luckmoneytimerule', LuckMoneyTimeRuleController::class);
    //提现
    $router->resource('withdraw', WithdrawController::class);
    $router->post('/withdraw/{id}/handle', 'WithdrawController@handle')->name('withdraw.handle');
    //提现配置
    $router->get('withdrawconfig/get', 'WithdrawConfigController@get');
    $router->any('withdrawconfig/save', 'WithdrawConfigController@save');

    //新闻头条
    $router->resource('report', ReportController::class);
    $router->any('/report/confirm/{id}', 'ReportController@confirm')->name('report.confirm');

    //直播
    $router->resource('history', HistoryController::class);

    //公众号维护
    $router->resource('wechatmenu', 'WechatMenuController', ['except' => ['create']]);
    $router->post('wechatmenu/publish', 'WechatMenuController@publish')->name('wechatmenu.publish');

});
